<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: red;
            /*设置弧度*/
            /*border-radius: 50%;*/
            /*将动画设置给div*/
            animation-name: move;
            /*时长*/
            animation-duration: 2s;
            /*速度曲线*/
            animation-timing-function: linear;
            /*执行次数*/
            animation-iteration-count: infinite;
            animation-direction: alternate;
        }

        /*定义动画关键帧*/
        @keyframes move {
            /*开始 结束from to
        需要中间过程0% 25%...*/

            from {
                margin-left: 0px;
            }

            to {
                margin-left: 200px;
            }

            0% {
                transform: translateX(0px) rotate(0deg);
            }

            25% {
                transform: translateX(50px) rotate(90deg);
                border-radius: 10px;
                background-color: green;
            }

            50% {
                transform: translateX(100px) rotate(180deg);
                border-radius: 20px;
                background-color: pink;
            }

            75% {
                transform: translateX(150px) rotate(270deg);
                border-radius: 35px;
                background-color: blueviolet;
            }

            100% {
                transform: translateX(200px) rotate(360deg);
                border-radius: 50%;
                background-color: yellow;
            }
        }

        @keyframes pound {
            from {
                transform: none;
            }

            to {
                transform: scale(1.2);
            }
        }
        img{
            animation: pound .2s linear infinite alternate;
        }
    </style>
</head>

<body>
    <div></div>
    <img width="150px" src="../音视频/1.webp" alt="">
</body>

</html>